package com.wangnan.controller;

import com.api2.User;
import com.api2.UserApi2;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class UserController implements UserApi2 {


    @RequestMapping("/isAlive")
    public String isAlive() {
        return "isAlive";
    }

    @RequestMapping("/getById")
    public User getById(Integer id) {
        User user = new User();
        user.setAge(id);
        return user;
    }

    @GetMapping("hi")
    public String getHi(){
        return "ssssss";
    }
}
